package com.young.shop.api.dao;

import com.young.shop.pojo.entity.Comment;
import com.young.shop.pojo.entity.Goods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentMapper {
    /**
     * 根据订单id查询商品信息
     * @return
     */
    List<Goods> selectGoodsByOrderId(@Param("orderId")Long orderId);

    /**
     * 往商品评论详情表里插入对应内容
     * @param comment
     */
    void insertComment(Comment comment);

    /**
     * 往商品评论关系表里插入对应内容
     * @param comment
     * @return
     */
    int insertRelation(Comment comment);

}
